<?php ob_start();?>
<?php
$root = $_SERVER['DOCUMENT_ROOT'];
include($root.'/standart/head.php');
include($root.'/standart/dateHeader.php');
include($root.'/standart/checkUser.php');
$db = connect();
$id = $_GET['ID'];
$stmt ="SELECT CATEGORY_ID 
		FROM MENU_FORMAT
		WHERE MENU_ID = $id";
$categories = '';
$res = $db->query($stmt) or die($stmt."<br/><br/>".mysql_error());
while($row = $res->fetch_assoc()){
	$categories = $categories.','.$row['CATEGORY_ID'];
}
$res->close();
disconnect($db);
?>
<span id="categories"><?php echo $categories.',';?></span>
<?php ob_end_flush(); ?>